<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<IEnumerable<TheWorldsWorst.ApiWrapper.Model.PostEvent>>" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Timeline</title>
    <link rel="Stylesheet" href="../../Content/Site.css" />
</head>
<body>
    <div>
        <a href="/"><img style="border-style: none" src="../../Content/img/logo.png" /></a>
    </div>
    <h1>Timeline - <a href="/question/<%= ViewData["QuestionId"] %>">Question</a></h1>
    <% foreach (var post in Model)
       { %>
            <div class="post-event">
                <%= post.Ago %> 
                -&gt; <%= Enum.GetName(typeof(TheWorldsWorst.StackOverflowClone.Model.PostEventType), post.PostTimelineType)%> 
                <% if (post.ActionUserId.HasValue)
                   { %>
                -&gt; <a href="/users/<%= post.ActionUserId %>"><%= TheWorldsWorst.StackOverflowClone.Model.ApiProxy.GetUserFor(post.ActionUserId.Value).Name%></a>
                <% } %>
                -&gt; <%= post.Action %>
                -&gt; <a href="/postredirect/<%= post.PostId %>">Post</a>
            </div>
    <% } %>
</body>
</html>
